Optimal. Leaf size=78 \[ \frac {(b c-a d)^2 (a+b x)^{n+1}}{b^3 (n+1)}+\frac {2 d (b c-a d) (a+b x)^{n+2}}{b^3 (n+2)}+\frac {d^2 (a+b x)^{n+3}}{b^3 (n+3)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {43} \[ \frac {(b c-a d)^2 (a+b x)^{n+1}}{b^3 (n+1)}+\frac {2 d (b c-a d) (a+b x)^{n+2}}{b^3 (n+2)}+\frac {d^2 (a+b x)^{n+3}}{b^3 (n+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rubi steps
\begin {align*} \int (a+b x)^n (c+d x)^2 \, dx &=\int \left (\frac {(b c-a d)^2 (a+b x)^n}{b^2}+\frac {2 d (b c-a d) (a+b x)^{1+n}}{b^2}+\frac {d^2 (a+b x)^{2+n}}{b^2}\right ) \, dx\\ &=\frac {(b c-a d)^2 (a+b x)^{1+n}}{b^3 (1+n)}+\frac {2 d (b c-a d) (a+b x)^{2+n}}{b^3 (2+n)}+\frac {d^2 (a+b x)^{3+n}}{b^3 (3+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 67, normalized size = 0.86 \[ \frac {(a+b x)^{n+1} \left (\frac {2 d (a+b x) (b c-a d)}{n+2}+\frac {(b c-a d)^2}{n+1}+\frac {d^2 (a+b x)^2}{n+3}\right )}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.96, size = 235, normalized size = 3.01 \[ \frac {{\left (a b^{2} c^{2} n^{2} + 6 \, a b^{2} c^{2} - 6 \, a^{2} b c d + 2 \, a^{3} d^{2} + {\left (b^{3} d^{2} n^{2} + 3 \, b^{3} d^{2} n + 2 \, b^{3} d^{2}\right )} x^{3} + {\left (6 \, b^{3} c d + {\left (2 \, b^{3} c d + a b^{2} d^{2}\right )} n^{2} + {\left (8 \, b^{3} c d + a b^{2} d^{2}\right )} n\right )} x^{2} + {\left (5 \, a b^{2} c^{2} - 2 \, a^{2} b c d\right )} n + {\left (6 \, b^{3} c^{2} + {\left (b^{3} c^{2} + 2 \, a b^{2} c d\right )} n^{2} + {\left (5 \, b^{3} c^{2} + 6 \, a b^{2} c d - 2 \, a^{2} b d^{2}\right )} n\right )} x\right )} {\left (b x + a\right )}^{n}}{b^{3} n^{3} + 6 \, b^{3} n^{2} + 11 \, b^{3} n + 6 \, b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.20, size = 385, normalized size = 4.94 \[ \frac {{\left (b x + a\right )}^{n} b^{3} d^{2} n^{2} x^{3} + 2 \, {\left (b x + a\right )}^{n} b^{3} c d n^{2} x^{2} + {\left (b x + a\right )}^{n} a b^{2} d^{2} n^{2} x^{2} + 3 \, {\left (b x + a\right )}^{n} b^{3} d^{2} n x^{3} + {\left (b x + a\right )}^{n} b^{3} c^{2} n^{2} x + 2 \, {\left (b x + a\right )}^{n} a b^{2} c d n^{2} x + 8 \, {\left (b x + a\right )}^{n} b^{3} c d n x^{2} + {\left (b x + a\right )}^{n} a b^{2} d^{2} n x^{2} + 2 \, {\left (b x + a\right )}^{n} b^{3} d^{2} x^{3} + {\left (b x + a\right )}^{n} a b^{2} c^{2} n^{2} + 5 \, {\left (b x + a\right )}^{n} b^{3} c^{2} n x + 6 \, {\left (b x + a\right )}^{n} a b^{2} c d n x - 2 \, {\left (b x + a\right )}^{n} a^{2} b d^{2} n x + 6 \, {\left (b x + a\right )}^{n} b^{3} c d x^{2} + 5 \, {\left (b x + a\right )}^{n} a b^{2} c^{2} n - 2 \, {\left (b x + a\right )}^{n} a^{2} b c d n + 6 \, {\left (b x + a\right )}^{n} b^{3} c^{2} x + 6 \, {\left (b x + a\right )}^{n} a b^{2} c^{2} - 6 \, {\left (b x + a\right )}^{n} a^{2} b c d + 2 \, {\left (b x + a\right )}^{n} a^{3} d^{2}}{b^{3} n^{3} + 6 \, b^{3} n^{2} + 11 \, b^{3} n + 6 \, b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.01, size = 159, normalized size = 2.04 \[ \frac {\left (b^{2} d^{2} n^{2} x^{2}+2 b^{2} c d \,n^{2} x +3 b^{2} d^{2} n \,x^{2}-2 a b \,d^{2} n x +b^{2} c^{2} n^{2}+8 b^{2} c d n x +2 b^{2} d^{2} x^{2}-2 a b c d n -2 a b \,d^{2} x +5 b^{2} c^{2} n +6 b^{2} c d x +2 a^{2} d^{2}-6 a b c d +6 b^{2} c^{2}\right ) \left (b x +a \right )^{n +1}}{\left (n^{3}+6 n^{2}+11 n +6\right ) b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.50, size = 138, normalized size = 1.77 \[ \frac {2 \, {\left (b^{2} {\left (n + 1\right )} x^{2} + a b n x - a^{2}\right )} {\left (b x + a\right )}^{n} c d}{{\left (n^{2} + 3 \, n + 2\right )} b^{2}} + \frac {{\left (b x + a\right )}^{n + 1} c^{2}}{b {\left (n + 1\right )}} + \frac {{\left ({\left (n^{2} + 3 \, n + 2\right )} b^{3} x^{3} + {\left (n^{2} + n\right )} a b^{2} x^{2} - 2 \, a^{2} b n x + 2 \, a^{3}\right )} {\left (b x + a\right )}^{n} d^{2}}{{\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.36, size = 226, normalized size = 2.90 \[ {\left (a+b\,x\right )}^n\,\left (\frac {a\,\left (2\,a^2\,d^2-2\,a\,b\,c\,d\,n-6\,a\,b\,c\,d+b^2\,c^2\,n^2+5\,b^2\,c^2\,n+6\,b^2\,c^2\right )}{b^3\,\left (n^3+6\,n^2+11\,n+6\right )}+\frac {d^2\,x^3\,\left (n^2+3\,n+2\right )}{n^3+6\,n^2+11\,n+6}+\frac {x\,\left (-2\,a^2\,b\,d^2\,n+2\,a\,b^2\,c\,d\,n^2+6\,a\,b^2\,c\,d\,n+b^3\,c^2\,n^2+5\,b^3\,c^2\,n+6\,b^3\,c^2\right )}{b^3\,\left (n^3+6\,n^2+11\,n+6\right )}+\frac {d\,x^2\,\left (n+1\right )\,\left (6\,b\,c+a\,d\,n+2\,b\,c\,n\right )}{b\,\left (n^3+6\,n^2+11\,n+6\right )}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.27, size = 1506, normalized size = 19.31 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________